<%@page pageEncoding="UTF-8" %>
<html class="no-js fixed-layout">
<head>
    <%@ include file="/WEB-INF/jsp/include/staticResource.jsp" %>
    <%@ include file="/WEB-INF/jsp/include/meau_head.jsp" %>
    <title>个人设置</title>

    <script type="text/javascript">

      /*$(function () {
        $("#Pagination").pagination(10, {
          num_edge_entries: 1, //边缘页数
          num_display_entries: 2, //主体页数
          callback: CheckPost,
          items_per_page:10, //每页显示1项
          current_page:(2),
          prev_text : "上一页",
          next_text : "下一页"
        });
      });*/



        function CheckPost() {
            var url = "${APP_PATH}/sysUser/saveUserMessage";
            var params1 = $("#userForm").serialize();
            $.post(url, params1, function (data) {
                if (data.status == 1) {
                    alert("1");
                    alert(data.message);
                } else {
                    alert("2");
                    alert(data.message);
                }
            });
            return false;
        }


        function getIndex() {
            window.location.href = "${APP_PATH}/index";
        }
        /*$("#userForm").submit(function () {
               $.post(url, params1, function (data) {
                   if (data.status == 1) {
                       alert(data.message);
                   } else {
                       alert(data.message);
                   }
               });
               return false;
           });*/
        /*var url = "${APP_PATH}/sysUser/saveUserMessage";
            var params1 = $("#userForm").serialize();
            $.post(url, params1, function (data) {
                if (data.status == 1) {
                    alert(data.message);
                } else {
                    alert(data.message);
                }
            });*/
    </script>

</head>
<body>
<br>
<br>
<div class="admin-content">
    <div class="admin-content-body">
        <div class="am-cf am-padding am-padding-bottom-0">
            <div class="am-fl am-cf">
                <strong class="am-text-primary am-text-lg">${sessionScope.loginName}</strong> /
                <small>个人信息</small>
            </div>
        </div>
        <div class="am-tabs am-margin" data-am-tabs>
            <ul class="am-tabs-nav am-nav am-nav-tabs">
                <li class="am-active"><a href="#tab1">基本信息</a></li>
            </ul>

            <div class="am-tabs-bd">
                <div class="am-tab-panel am-fade am-in am-active" id="tab1">
                    <form id="userForm" action="${APP_PATH}/sysUser/saveUserMessage"   onsubmit="return CheckPost();"
                          class="am-form am-form-inline required">
                        <input id="id" name="id" value="${sysUser.id}" type="hidden">
                        <div class="am-g am-margin-top">
                            <div class="am-u-sm-4 am-u-md-2 am-text-right">
                                姓名：
                            </div>
                            <div class="am-input-group am-input-group-primary">
                                <span class="am-input-group-label"><i class="am-icon-user am-icon-fw"></i></span>
                                <input id="userName" required="required" name="userName" value="${sysUser.userName}"
                                       type="text" class="am-form-field required" placeholder="姓名">
                            </div>
                        </div>

                        <div class="am-g am-margin-top">
                            <div class="am-u-sm-4 am-u-md-2 am-text-right">
                                性别：
                            </div>
                            <div class="am-radio">
                                <label>
                                    <input type="radio" name="sex" value="0" checked>
                                    男
                                </label>
                                <label>
                                    <input type="radio" name="sex" value="1">
                                    女
                                </label>
                            </div>
                        </div>
                        <div class="am-g am-margin-top">
                            <div class="am-u-sm-4 am-u-md-2 am-text-right">
                                手机号码：
                            </div>
                            <div class="am-input-group am-input-group-primary">
                                <span class="am-input-group-label"><i class="am-icon-phone am-icon-fw"></i></span>
                                <input type="text" value="${sysUser.userPhone}"
                                       class="am-form-field js-pattern-mobile required" id="userPhone" name="userPhone"
                                       placeholder="输入手机号码">
                            </div>
                        </div>
                        <%--<span class="am-icon-qq"> QQ</span>
                        <span class="am-icon-weixin"> Wechat</span>--%>
                        <div class="am-g am-margin-top">
                            <div class="am-u-sm-4 am-u-md-2 am-text-right">
                                QQ：
                            </div>
                            <div class="am-input-group am-input-group-primary">
                                <span class="am-input-group-label"><i class="am-icon-qq am-icon-fw"></i></span>
                                <input type="text" value="${sysUser.qqNum}" class="am-form-field" id="qqNum"
                                       name="qqNum" placeholder="输入qq号码">
                            </div>
                        </div>


                        <div class="am-g am-margin-top">
                            <div class="am-u-sm-4 am-u-md-2 am-text-right">
                                邮箱：${sysUser.userEmail}
                            </div>
                            <div class="am-input-group am-input-group-primary">
                                <span class="am-input-group-label"><i class="am-icon-wordpress am-icon-fw"></i></span>
                                <input type="text" class="am-form-field" value="${sysUser.userEmail}" id="userEmail"
                                       name="userEmail" placeholder="输入电子邮箱">
                            </div>
                        </div>
                        <div class="am-g am-margin-top">
                            <div class="am-u-sm-4 am-u-md-2 am-text-right">
                                身份证号码：
                            </div>
                            <div class="am-input-group am-input-group-primary">
                                <span class="am-input-group-label"><i class="am-icon-user-md  am-icon-fw"></i></span>
                                <input type="text" class="am-form-field" value="${sysUser.idNum}" id="idNum"
                                       name="idNum" placeholder="输入身份证号码">
                            </div>
                        </div>
                        <div class="am-g am-margin-top">
                            <div class="am-u-sm-4 am-u-md-2 am-text-right">
                                家庭住址：
                            </div>
                            <div class=" am-input-group am-input-group-primary" style="width: 630px">
                                <span style="width: 20px" class="am-input-group-label"><i
                                        class="am-icon-home am-icon-fw"></i></span>
                                <input type="text" class="am-form-field" id="address" value="${sysUser.address}"
                                       name="address" placeholder="输入家庭住址">
                            </div>
                        </div>

                        <div class="am-g am-margin-top am-margin">
                            <button type="button" onclick="toSave()" class="am-btn am-btn-primary am-btn-xs">提交保存
                            </button>
                            <button type="submit"  class="am-btn am-btn-primary am-btn-xs">提交保存1</button>
                        </div>
                    </form>
                </div>
                    <div id="Pagination" class="pagination"><!-- 这里显示分页 --></div>
            </div>

        </div>
    </div>
</div>

</body>
</html>
